﻿// <copyright file="BlogEntryComment.cs" company="Clever Software">
// Copyright (c) 2013, 2014 All Right Reserved, http://www.cleversoftware.by
//
// This source is subject to the Microsoft Permissive License.
// Please see the License.txt file for more information.
// All other rights reserved.
//
// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY 
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// </copyright>
// <author>Clever Software</author>
// <email>info@cleversoftware.by</email>
// <date>2014-02-04</date> 
// <summary>CleverCMS source code</summary>

//All propertiex should be virtual according http://msdn.microsoft.com/en-us/library/dd468057.aspx

namespace CleverCMS.Blog.Data.Entities
{
    using System;
    using System.Web.Mvc;
    using System.ComponentModel.DataAnnotations;
    using System.ComponentModel.DataAnnotations.Schema;

    public class BlogEntryComment 
    {
        public BlogEntryComment()
        {
            CreatedAt = DateTime.Now;
            Pingback = false;
        }

        [Key]
        public virtual int Id { get; set; }
        /// <summary>
        /// Gets or sets the blog entry id.
        /// </summary>
        public virtual int BlogEntryId { get; set; }
        /// <summary>
        /// Gets or sets the blog entry id.
        /// </summary>
        public virtual int? ParentId { get; set; }
        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        public virtual string Name { get; set; }
        /// <summary>
        /// Gets or sets the email.
        /// </summary>
        public virtual string Email { get; set; }
        /// <summary>
        /// Gets or sets the comment.
        /// </summary>
        [AllowHtml]
        public virtual string Comment { get; set; }
        /// <summary>
        /// Gets or sets the homepage.
        /// </summary>
        public virtual string Homepage { get; set; }
        /// <summary>
        /// Gets or sets a value indicating whether [admin post].
        /// </summary>
        public virtual bool AdminPost { get; set; }
        /// <summary>
        /// Gets or sets a value indicating whether this <see cref="BlogEntryComment"/> is visible.
        /// </summary>
        public virtual bool Visible { get; set; }
        /// <summary>
        /// Gets or sets a value indicating whether this <see cref="BlogEntryComment"/> is pingback.
        /// </summary>
        public virtual bool Pingback { get; set; }
        /// <summary>
        /// Gets creation time
        /// </summary>
        public virtual DateTime CreatedAt { get; set; }
        /// <summary>
        /// Gets or sets the blog entry.
        /// </summary>
        [ForeignKey("BlogEntryId")]
        public virtual BlogEntry BlogEntry { get; set; }
      
    
    }
}